<?php
class PageControl extends CommonControl
{
	public function actionIndex($id = 0)
	{
		if((int)$id == 0) D::error('你想干什么？');
		$id = (int)$id;

		$singlePage = pageModel::model()->findByPk($id);

		empty($singlePage) && D::error('#'.$id.' 单页不存在');

		$bread = $this->getBreadCrumbs(array('首页'=>'index', $singlePage['title']=>''));

		$var = array(
			'page'		   => $singlePage,
			'bread_crumbs' => $bread
		);
		$this->render('page', $var);
	}
}

?>